<? $page_title='盘亏调出' ?>

<?include "FASHION/page_header.phtml"?>

<script language="JavaScript">
$(function(){ajax_form({id:'form1', success:function(){location.reload();}, before:function(){ return check_amount() && confirm('确认提交<?$page_title?>吗？');} });});
</script>

<form method="post" id="form1">
<table border="0" width="100%"><tbody>
<tr><td>
	<table border=0 class="list" width="100%" id="stuff_list"><tbody>
		<tr class="nobg">
			<td colspan="10" class="left"><?=htmlutil::search_wares('outbound')?></td>
		</tr>
		<tr class="nobg">
			<th>编号</th>
			<th>材料名称</th>
			<th>品牌</th>
			<th>规格</th>
			<th>单位</th>
			<th>数量</th>
			<th>单价</th>
			<th>金额</th>
			<th>备注</th>
			<th width="40">&nbsp;</th>
		</tr>
<{if $stuffs}>
<{foreach item=ware from=$stuffs}>
		<tr id="selstf_<{$ware.id}>">
			<td><{$ware.sno}>&nbsp;</td>
			<td><{$ware.name}>&nbsp;</td>
			<td class="center"><{$ware.brand}></td>
			<td class="center"><{$ware.specific}></td>
			<td class="center"><{$ware.unit}></td>
			<td class="center" style="padding:0;"><input type="text" name="amount[<{$ware.id}>]" size="5" class="decimal" onfocus="chkdig_int(this)" /> / <{$ware.amount}></td>
			<td class="center" style="padding:0;"><div id="sprice_<{=fnum($ware.price)}>"></div></td>
			<td class="center"><div id="ssum_<{$ware.id}>"></div></td>
			<td class="center" style="padding:0;"><input type="text" name="remark[<{$ware.id}>]" value='' size="8" /></td>
			<td class="center"><a href="javascript:;" onclick="$('#selstf_<{$ware.id}>').remove();do_stuff_total();">取消</a></td>
		</tr>
<{/foreach}>
<{/if}>
	</tbody></table>
</td></tr>
<tr>
	<td colspan="12">仓库：<?= Html::options(Warehouse::getList(), 'warehouse_id', '', 'name', 'warehouse_id', '--选择仓库--') ?></td>
</tr>
<tr>
	<td class="center">
		<br/> <input type="submit" value="提交盘亏出库单" class="submit" />
	</td>
</tr>
</tbody></table>
</form>

<?include "FASHION/page_footer.phtml"?>
